package com.tjsiqi.Vo;

import com.tjsiqi.util.DateDiff;
import com.tjsiqi.util.DateTimeUtil;
import lombok.*;

import java.util.Date;

@Setter
@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class JbzInfoMVo {
    private String code;

    private String mc;

    private String dh;

    private String fzr;

    private String bz;

    private Date registertime;

    private Date modifytime;

    private String remaintime;

    public String getRemaintime() {
        long remaintime =  DateDiff.dateDiff(this.getModifytime(),DateTimeUtil.dateToStr(new Date(),"yyyy年MM月dd日"),"yyyy年MM月dd日","d");
        return (365L - remaintime)+"";
    }

    public String getRegistertime() {
        return DateTimeUtil.dateToStr(registertime,"yyyy年MM月dd日");
    }

    public String getModifytime() {
        return DateTimeUtil.dateToStr(modifytime,"yyyy年MM月dd日");
    }

}